<?php
/**
 * Created by PhpStorm.
 * UsersF: Mloong
 * Date: 2019/2/27
 * Time: 11:13
 */

namespace app\login\controller;


use app\api\service\Token;
use app\common\controller\Info;
use app\common\controller\RegisteredPhone;
use app\lib\exception\MysqlErrorException;
use app\login\service\RegisteredService;
use app\login\model\Registered as RegisteredModel;
use think\Db;
use think\Exception;

class Registered extends BaseController
{
    public function index()
    {
        return $this->fetch('/login/Registered');
    }

    public function updateAllStatus()
    {
        $name = Token::getRedisTokenName();
        $service = new RegisteredService();
        $data = $service->updateTodayStatus($name);
        return json($data);
    }

    public function getPhoneInfo($phone, $type, $logo)
    {
        $common = new Info();
        $result = $common->getPhoneInfo($phone, $type, $logo);
        return $result;
    }
}